package com.example.myapplication.net.model;

import com.example.myapplication.bean.LoginDetailBean;
import com.example.myapplication.net.usecase.GetPhoneVerifyCodeUseCase;
import com.example.common.base.INetCallBack;
import com.example.myapplication.net.usecase.LoginUseCase;
import ohos.app.Context;

/**
 * @author geyao
 * @date 2021/7/6
 * des:
 */
public class MainModeImpl implements IMainModel {
    private final Context context;

    public MainModeImpl(Context context) {
        this.context = context;
    }

    @Override
    public void getPhoneVerifyCode(String phoneNum, INetCallBack<Boolean> callBack) {
        new GetPhoneVerifyCodeUseCase(context, true, phoneNum).execute(callBack);
    }

    @Override
    public void login(String phoneNum, String verifyCode, INetCallBack<LoginDetailBean> callBack) {
        new LoginUseCase(context, true, phoneNum, verifyCode).execute(callBack);
    }
}
